Integrand size = 15, antiderivative size = 90 \[ \int \frac {\sec ^5(x)}{a+b \cos ^2(x)} \, dx=\frac {\left (3 a^2-4 a b+8 b^2\right ) \text {arctanh}(\sin (x))}{8 a^3}-\frac {b^{5/2} \text {arctanh}\left (\frac {\sqrt {b} \sin (x)}{\sqrt {a+b}}\right )}{a^3 \sqrt {a+b}}+\frac {(3 a-4 b) \sec (x) \tan (x)}{8 a^2}+\frac {\sec ^3(x) \tan (x)}{4 a} \]
1/8*(3*a^2-4*a*b+8*b^2)*arctanh(sin(x))/a^3-b^(5/2)*arctanh(sin(x)*b^(1/2) /(a+b)^(1/2))/a^3/(a+b)^(1/2)+1/8*(3*a-4*b)*sec(x)*tan(x)/a^2+1/4*sec(x)^3 *tan(x)/a
Leaf count is larger than twice the leaf count of optimal. \(215\) vs. \(2(90)=180\).
Time = 0.85 (sec) , antiderivative size = 215, normalized size of antiderivative = 2.39 \[ \int \frac {\sec ^5(x)}{a+b \cos ^2(x)} \, dx=\frac {-2 \left (3 a^2-4 a b+8 b^2\right ) \log \left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right )+2 \left (3 a^2-4 a b+8 b^2\right ) \log \left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right )+\frac {8 b^{5/2} \log \left (\sqrt {a+b}-\sqrt {b} \sin (x)\right )}{\sqrt {a+b}}-\frac {8 b^{5/2} \log \left (\sqrt {a+b}+\sqrt {b} \sin (x)\right )}{\sqrt {a+b}}+\frac {a^2}{\left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right )^4}-\frac {a^2}{\left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right )^4}+\frac {a (-3 a+4 b)}{\left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right )^2}+\frac {a (-3 a+4 b)}{-1+\sin (x)}}{16 a^3} \]
(-2*(3*a^2 - 4*a*b + 8*b^2)*Log[Cos[x/2] - Sin[x/2]] + 2*(3*a^2 - 4*a*b + 8*b^2)*Log[Cos[x/2] + Sin[x/2]] + (8*b^(5/2)*Log[Sqrt[a + b] - Sqrt[b]*Sin [x]])/Sqrt[a + b] - (8*b^(5/2)*Log[Sqrt[a + b] + Sqrt[b]*Sin[x]])/Sqrt[a + b] + a^2/(Cos[x/2] - Sin[x/2])^4 - a^2/(Cos[x/2] + Sin[x/2])^4 + (a*(-3*a + 4*b))/(Cos[x/2] + Sin[x/2])^2 + (a*(-3*a + 4*b))/(-1 + Sin[x]))/(16*a^3 )
Time = 0.33 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.30, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.467, Rules used = {3042, 3665, 316, 402, 397, 219, 221}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec ^5(x)}{a+b \cos ^2(x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sin \left (x+\frac {\pi }{2}\right )^5 \left (a+b \sin \left (x+\frac {\pi }{2}\right )^2\right )}dx\) |
\(\Big \downarrow \) 3665 |
\(\displaystyle \int \frac {1}{\left (1-\sin ^2(x)\right )^3 \left (a-b \sin ^2(x)+b\right )}d\sin (x)\) |
\(\Big \downarrow \) 316 |
\(\displaystyle \frac {\int \frac {-3 b \sin ^2(x)+3 a-b}{\left (1-\sin ^2(x)\right )^2 \left (-b \sin ^2(x)+a+b\right )}d\sin (x)}{4 a}+\frac {\sin (x)}{4 a \left (1-\sin ^2(x)\right )^2}\) |
\(\Big \downarrow \) 402 |
\(\displaystyle \frac {\frac {\int \frac {3 a^2-b a+4 b^2-(3 a-4 b) b \sin ^2(x)}{\left (1-\sin ^2(x)\right ) \left (-b \sin ^2(x)+a+b\right )}d\sin (x)}{2 a}+\frac {(3 a-4 b) \sin (x)}{2 a \left (1-\sin ^2(x)\right )}}{4 a}+\frac {\sin (x)}{4 a \left (1-\sin ^2(x)\right )^2}\) |
\(\Big \downarrow \) 397 |
\(\displaystyle \frac {\frac {\frac {\left (3 a^2-4 a b+8 b^2\right ) \int \frac {1}{1-\sin ^2(x)}d\sin (x)}{a}-\frac {8 b^3 \int \frac {1}{-b \sin ^2(x)+a+b}d\sin (x)}{a}}{2 a}+\frac {(3 a-4 b) \sin (x)}{2 a \left (1-\sin ^2(x)\right )}}{4 a}+\frac {\sin (x)}{4 a \left (1-\sin ^2(x)\right )^2}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {\frac {\frac {\left (3 a^2-4 a b+8 b^2\right ) \text {arctanh}(\sin (x))}{a}-\frac {8 b^3 \int \frac {1}{-b \sin ^2(x)+a+b}d\sin (x)}{a}}{2 a}+\frac {(3 a-4 b) \sin (x)}{2 a \left (1-\sin ^2(x)\right )}}{4 a}+\frac {\sin (x)}{4 a \left (1-\sin ^2(x)\right )^2}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {\frac {\frac {\left (3 a^2-4 a b+8 b^2\right ) \text {arctanh}(\sin (x))}{a}-\frac {8 b^{5/2} \text {arctanh}\left (\frac {\sqrt {b} \sin (x)}{\sqrt {a+b}}\right )}{a \sqrt {a+b}}}{2 a}+\frac {(3 a-4 b) \sin (x)}{2 a \left (1-\sin ^2(x)\right )}}{4 a}+\frac {\sin (x)}{4 a \left (1-\sin ^2(x)\right )^2}\) |
Sin[x]/(4*a*(1 - Sin[x]^2)^2) + ((((3*a^2 - 4*a*b + 8*b^2)*ArcTanh[Sin[x]] )/a - (8*b^(5/2)*ArcTanh[(Sqrt[b]*Sin[x])/Sqrt[a + b]])/(a*Sqrt[a + b]))/( 2*a) + ((3*a - 4*b)*Sin[x])/(2*a*(1 - Sin[x]^2)))/(4*a)
3.1.34.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim p[(-b)*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q + 1)/(2*a*(p + 1)*(b*c - a*d)) ), x] + Simp[1/(2*a*(p + 1)*(b*c - a*d)) Int[(a + b*x^2)^(p + 1)*(c + d*x ^2)^q*Simp[b*c + 2*(p + 1)*(b*c - a*d) + d*b*(2*(p + q + 2) + 1)*x^2, x], x ], x] /; FreeQ[{a, b, c, d, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && ! ( !IntegerQ[p] && IntegerQ[q] && LtQ[q, -1]) && IntBinomialQ[a, b, c, d, 2, p, q, x]
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_ Symbol] :> Simp[(b*e - a*f)/(b*c - a*d) Int[1/(a + b*x^2), x], x] - Simp[ (d*e - c*f)/(b*c - a*d) Int[1/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d, e , f}, x]
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_.)*((e_) + (f_.)*(x _)^2), x_Symbol] :> Simp[(-(b*e - a*f))*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^ (q + 1)/(a*2*(b*c - a*d)*(p + 1))), x] + Simp[1/(a*2*(b*c - a*d)*(p + 1)) Int[(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[c*(b*e - a*f) + e*2*(b*c - a*d) *(p + 1) + d*(b*e - a*f)*(2*(p + q + 2) + 1)*x^2, x], x], x] /; FreeQ[{a, b , c, d, e, f, q}, x] && LtQ[p, -1]
Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^ (p_.), x_Symbol] :> With[{ff = FreeFactors[Cos[e + f*x], x]}, Simp[-ff/f Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b - b*ff^2*x^2)^p, x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]
Time = 1.76 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.52
method | result | size |
default | \(\frac {1}{16 a \left (\sin \left (x \right )-1\right )^{2}}-\frac {3 a -4 b}{16 a^{2} \left (\sin \left (x \right )-1\right )}+\frac {\left (-3 a^{2}+4 a b -8 b^{2}\right ) \ln \left (\sin \left (x \right )-1\right )}{16 a^{3}}-\frac {1}{16 a \left (\sin \left (x \right )+1\right )^{2}}-\frac {3 a -4 b}{16 a^{2} \left (\sin \left (x \right )+1\right )}+\frac {\left (3 a^{2}-4 a b +8 b^{2}\right ) \ln \left (\sin \left (x \right )+1\right )}{16 a^{3}}-\frac {b^{3} \operatorname {arctanh}\left (\frac {b \sin \left (x \right )}{\sqrt {\left (a +b \right ) b}}\right )}{a^{3} \sqrt {\left (a +b \right ) b}}\) | \(137\) |
risch | \(-\frac {i \left (3 a \,{\mathrm e}^{7 i x}-4 b \,{\mathrm e}^{7 i x}+11 a \,{\mathrm e}^{5 i x}-4 b \,{\mathrm e}^{5 i x}-11 a \,{\mathrm e}^{3 i x}+4 b \,{\mathrm e}^{3 i x}-3 \,{\mathrm e}^{i x} a +4 \,{\mathrm e}^{i x} b \right )}{4 \left ({\mathrm e}^{2 i x}+1\right )^{4} a^{2}}+\frac {3 \ln \left ({\mathrm e}^{i x}+i\right )}{8 a}-\frac {\ln \left ({\mathrm e}^{i x}+i\right ) b}{2 a^{2}}+\frac {\ln \left ({\mathrm e}^{i x}+i\right ) b^{2}}{a^{3}}-\frac {3 \ln \left ({\mathrm e}^{i x}-i\right )}{8 a}+\frac {\ln \left ({\mathrm e}^{i x}-i\right ) b}{2 a^{2}}-\frac {\ln \left ({\mathrm e}^{i x}-i\right ) b^{2}}{a^{3}}+\frac {\sqrt {\left (a +b \right ) b}\, b^{2} \ln \left ({\mathrm e}^{2 i x}-\frac {2 i \sqrt {\left (a +b \right ) b}\, {\mathrm e}^{i x}}{b}-1\right )}{2 \left (a +b \right ) a^{3}}-\frac {\sqrt {\left (a +b \right ) b}\, b^{2} \ln \left ({\mathrm e}^{2 i x}+\frac {2 i \sqrt {\left (a +b \right ) b}\, {\mathrm e}^{i x}}{b}-1\right )}{2 \left (a +b \right ) a^{3}}\) | \(265\) |
1/16/a/(sin(x)-1)^2-1/16*(3*a-4*b)/a^2/(sin(x)-1)+1/16/a^3*(-3*a^2+4*a*b-8 *b^2)*ln(sin(x)-1)-1/16/a/(sin(x)+1)^2-1/16*(3*a-4*b)/a^2/(sin(x)+1)+1/16* (3*a^2-4*a*b+8*b^2)/a^3*ln(sin(x)+1)-b^3/a^3/((a+b)*b)^(1/2)*arctanh(b*sin (x)/((a+b)*b)^(1/2))
Time = 0.29 (sec) , antiderivative size = 270, normalized size of antiderivative = 3.00 \[ \int \frac {\sec ^5(x)}{a+b \cos ^2(x)} \, dx=\left [\frac {8 \, b^{2} \sqrt {\frac {b}{a + b}} \cos \left (x\right )^{4} \log \left (-\frac {b \cos \left (x\right )^{2} + 2 \, {\left (a + b\right )} \sqrt {\frac {b}{a + b}} \sin \left (x\right ) - a - 2 \, b}{b \cos \left (x\right )^{2} + a}\right ) + {\left (3 \, a^{2} - 4 \, a b + 8 \, b^{2}\right )} \cos \left (x\right )^{4} \log \left (\sin \left (x\right ) + 1\right ) - {\left (3 \, a^{2} - 4 \, a b + 8 \, b^{2}\right )} \cos \left (x\right )^{4} \log \left (-\sin \left (x\right ) + 1\right ) + 2 \, {\left ({\left (3 \, a^{2} - 4 \, a b\right )} \cos \left (x\right )^{2} + 2 \, a^{2}\right )} \sin \left (x\right )}{16 \, a^{3} \cos \left (x\right )^{4}}, \frac {16 \, b^{2} \sqrt {-\frac {b}{a + b}} \arctan \left (\sqrt {-\frac {b}{a + b}} \sin \left (x\right )\right ) \cos \left (x\right )^{4} + {\left (3 \, a^{2} - 4 \, a b + 8 \, b^{2}\right )} \cos \left (x\right )^{4} \log \left (\sin \left (x\right ) + 1\right ) - {\left (3 \, a^{2} - 4 \, a b + 8 \, b^{2}\right )} \cos \left (x\right )^{4} \log \left (-\sin \left (x\right ) + 1\right ) + 2 \, {\left ({\left (3 \, a^{2} - 4 \, a b\right )} \cos \left (x\right )^{2} + 2 \, a^{2}\right )} \sin \left (x\right )}{16 \, a^{3} \cos \left (x\right )^{4}}\right ] \]
[1/16*(8*b^2*sqrt(b/(a + b))*cos(x)^4*log(-(b*cos(x)^2 + 2*(a + b)*sqrt(b/ (a + b))*sin(x) - a - 2*b)/(b*cos(x)^2 + a)) + (3*a^2 - 4*a*b + 8*b^2)*cos (x)^4*log(sin(x) + 1) - (3*a^2 - 4*a*b + 8*b^2)*cos(x)^4*log(-sin(x) + 1) + 2*((3*a^2 - 4*a*b)*cos(x)^2 + 2*a^2)*sin(x))/(a^3*cos(x)^4), 1/16*(16*b^ 2*sqrt(-b/(a + b))*arctan(sqrt(-b/(a + b))*sin(x))*cos(x)^4 + (3*a^2 - 4*a *b + 8*b^2)*cos(x)^4*log(sin(x) + 1) - (3*a^2 - 4*a*b + 8*b^2)*cos(x)^4*lo g(-sin(x) + 1) + 2*((3*a^2 - 4*a*b)*cos(x)^2 + 2*a^2)*sin(x))/(a^3*cos(x)^ 4)]
\[ \int \frac {\sec ^5(x)}{a+b \cos ^2(x)} \, dx=\int \frac {\sec ^{5}{\left (x \right )}}{a + b \cos ^{2}{\left (x \right )}}\, dx \]
Time = 0.31 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.61 \[ \int \frac {\sec ^5(x)}{a+b \cos ^2(x)} \, dx=\frac {b^{3} \log \left (\frac {b \sin \left (x\right ) - \sqrt {{\left (a + b\right )} b}}{b \sin \left (x\right ) + \sqrt {{\left (a + b\right )} b}}\right )}{2 \, \sqrt {{\left (a + b\right )} b} a^{3}} - \frac {{\left (3 \, a - 4 \, b\right )} \sin \left (x\right )^{3} - {\left (5 \, a - 4 \, b\right )} \sin \left (x\right )}{8 \, {\left (a^{2} \sin \left (x\right )^{4} - 2 \, a^{2} \sin \left (x\right )^{2} + a^{2}\right )}} + \frac {{\left (3 \, a^{2} - 4 \, a b + 8 \, b^{2}\right )} \log \left (\sin \left (x\right ) + 1\right )}{16 \, a^{3}} - \frac {{\left (3 \, a^{2} - 4 \, a b + 8 \, b^{2}\right )} \log \left (\sin \left (x\right ) - 1\right )}{16 \, a^{3}} \]
1/2*b^3*log((b*sin(x) - sqrt((a + b)*b))/(b*sin(x) + sqrt((a + b)*b)))/(sq rt((a + b)*b)*a^3) - 1/8*((3*a - 4*b)*sin(x)^3 - (5*a - 4*b)*sin(x))/(a^2* sin(x)^4 - 2*a^2*sin(x)^2 + a^2) + 1/16*(3*a^2 - 4*a*b + 8*b^2)*log(sin(x) + 1)/a^3 - 1/16*(3*a^2 - 4*a*b + 8*b^2)*log(sin(x) - 1)/a^3
Time = 0.33 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.41 \[ \int \frac {\sec ^5(x)}{a+b \cos ^2(x)} \, dx=\frac {b^{3} \arctan \left (\frac {b \sin \left (x\right )}{\sqrt {-a b - b^{2}}}\right )}{\sqrt {-a b - b^{2}} a^{3}} + \frac {{\left (3 \, a^{2} - 4 \, a b + 8 \, b^{2}\right )} \log \left (\sin \left (x\right ) + 1\right )}{16 \, a^{3}} - \frac {{\left (3 \, a^{2} - 4 \, a b + 8 \, b^{2}\right )} \log \left (-\sin \left (x\right ) + 1\right )}{16 \, a^{3}} - \frac {3 \, a \sin \left (x\right )^{3} - 4 \, b \sin \left (x\right )^{3} - 5 \, a \sin \left (x\right ) + 4 \, b \sin \left (x\right )}{8 \, {\left (\sin \left (x\right )^{2} - 1\right )}^{2} a^{2}} \]
b^3*arctan(b*sin(x)/sqrt(-a*b - b^2))/(sqrt(-a*b - b^2)*a^3) + 1/16*(3*a^2 - 4*a*b + 8*b^2)*log(sin(x) + 1)/a^3 - 1/16*(3*a^2 - 4*a*b + 8*b^2)*log(- sin(x) + 1)/a^3 - 1/8*(3*a*sin(x)^3 - 4*b*sin(x)^3 - 5*a*sin(x) + 4*b*sin( x))/((sin(x)^2 - 1)^2*a^2)
Time = 2.68 (sec) , antiderivative size = 969, normalized size of antiderivative = 10.77 \[ \int \frac {\sec ^5(x)}{a+b \cos ^2(x)} \, dx=\text {Too large to display} \]
(5*a^3*sin(x) + atan((b^7*sin(x)*(a*b^5 + b^6)^(1/2)*128i - a*sin(x)*(a*b^ 5 + b^6)^(3/2)*64i - b*sin(x)*(a*b^5 + b^6)^(3/2)*128i + a*b^6*sin(x)*(a*b ^5 + b^6)^(1/2)*192i + a^6*b*sin(x)*(a*b^5 + b^6)^(1/2)*9i + a^2*b^5*sin(x )*(a*b^5 + b^6)^(1/2)*64i + a^3*b^4*sin(x)*(a*b^5 + b^6)^(1/2)*40i + a^4*b ^3*sin(x)*(a*b^5 + b^6)^(1/2)*25i - a^5*b^2*sin(x)*(a*b^5 + b^6)^(1/2)*6i) /(40*a^3*b^7 + 65*a^4*b^6 + 19*a^5*b^5 + 3*a^6*b^4 + 9*a^7*b^3))*(a*b^5 + b^6)^(1/2)*8i - 3*a^3*sin(x)^3 + 3*a^3*atanh(sin(x)) + 8*b^3*atanh(sin(x)) - 4*a*b^2*sin(x) + a^2*b*sin(x) - atan((b^7*sin(x)*(a*b^5 + b^6)^(1/2)*12 8i - a*sin(x)*(a*b^5 + b^6)^(3/2)*64i - b*sin(x)*(a*b^5 + b^6)^(3/2)*128i + a*b^6*sin(x)*(a*b^5 + b^6)^(1/2)*192i + a^6*b*sin(x)*(a*b^5 + b^6)^(1/2) *9i + a^2*b^5*sin(x)*(a*b^5 + b^6)^(1/2)*64i + a^3*b^4*sin(x)*(a*b^5 + b^6 )^(1/2)*40i + a^4*b^3*sin(x)*(a*b^5 + b^6)^(1/2)*25i - a^5*b^2*sin(x)*(a*b ^5 + b^6)^(1/2)*6i)/(40*a^3*b^7 + 65*a^4*b^6 + 19*a^5*b^5 + 3*a^6*b^4 + 9* a^7*b^3))*sin(x)^2*(a*b^5 + b^6)^(1/2)*16i + atan((b^7*sin(x)*(a*b^5 + b^6 )^(1/2)*128i - a*sin(x)*(a*b^5 + b^6)^(3/2)*64i - b*sin(x)*(a*b^5 + b^6)^( 3/2)*128i + a*b^6*sin(x)*(a*b^5 + b^6)^(1/2)*192i + a^6*b*sin(x)*(a*b^5 + b^6)^(1/2)*9i + a^2*b^5*sin(x)*(a*b^5 + b^6)^(1/2)*64i + a^3*b^4*sin(x)*(a *b^5 + b^6)^(1/2)*40i + a^4*b^3*sin(x)*(a*b^5 + b^6)^(1/2)*25i - a^5*b^2*s in(x)*(a*b^5 + b^6)^(1/2)*6i)/(40*a^3*b^7 + 65*a^4*b^6 + 19*a^5*b^5 + 3*a^ 6*b^4 + 9*a^7*b^3))*sin(x)^4*(a*b^5 + b^6)^(1/2)*8i - 6*a^3*atanh(sin(x...